@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="policyInfoForm">

            <input type="hidden" id="id" value="${item.id}">
            <input type="hidden" id="insuranceIdValue" value="${item.insuranceId}">
            <input type="hidden" id="policyTypeValue" value="${item.policyType}">
            <input type="hidden" id="tenantIdValue" value="${item.tenantId}">
            <input type="hidden" id="paymentCycleValue" value="${item.paymentCycle}">
            <input type="hidden" id="chargeModeValue" value="${item.chargeMode}">
            <input type="hidden" id="deadlineValue" value="${item.deadline}">
            <input name="formToken" type="hidden" value="${session.formToken}" />
            <div class="row">
                <div class="col-sm-6">
                    <#select id="insuranceId" name="保险公司" underline="true" >
                    @for(insurance in insurances!){
                    <option value="${insurance.id}">${insurance.insuranceAbbr}</option>
                    @}
                </#select>
                    <#input id="effectiveDate" name="生效日期" underline="true" type="text"  value="${item.effectiveDate}" />
                    <#select id="policyType" name="保单类型" underline="true" onchange="PolicyInfoDlg.selectPolicyType()">
                    <option value="1">集合保单</option>
                    <option value="2">独立保单</option>
                </#select>
            </div>

            <div class="col-sm-6">
                <#input id="policyCode" name="保单号" underline="true" maxlength="30"  value="${item.policyCode}" />
                <#input id="invalidDate" name="失效日期" underline="true" type="text" value="${item.invalidDate}"/>
                <#select id="tenantId" name="所属客户" underline="true" >
                    @for(tenant in tenants!){
                    <option value="${tenant.id}">${tenant.tenantName}</option>
                    @}
                </#select>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-9">
                <div class="form-group">
                    <label class="col-sm-2 control-label">缴费方式</label>
                    <div class="col-sm-3">
                        <select id="paymentCycle" class="form-control" onchange="PolicyInfoDlg.selectPaymentCycle()">
                            <option value="0">缴费周期</option>
                            <option value="1">月缴</option>
                            <option value="2">季缴</option>
                            <option value="3">年缴</option>
                        </select>
                    </div>
                    <div class="col-sm-3" >
                        <select id="chargeMode" class="form-control" onchange="PolicyInfoDlg.selectChargeMode()">
                            <option value="0">计费方式</option>
                            <option value="1">按天计费</option>
                            <option value="2">按月计费</option>
                        </select>
                    </div>
                    <div class="col-sm-4">
                        <select id="deadline" class="form-control" >
                            <option value="0">计费截止日</option>
                            <option value="1">1</option>
                            <option value="2">2</option>
                            <option value="3">3</option>
                            <option value="4">4</option>
                            <option value="5">5</option>
                            <option value="6">6</option>
                            <option value="7">7</option>
                            <option value="8">8</option>
                            <option value="9">9</option>
                            <option value="10">10</option>
                            <option value="11">11</option>
                            <option value="12">12</option>
                            <option value="13">13</option>
                            <option value="14">14</option>
                            <option value="15">15</option>
                            <option value="16">16</option>
                            <option value="17">17</option>
                            <option value="18">18</option>
                            <option value="19">19</option>
                            <option value="20">20</option>
                            <option value="21">21</option>
                            <option value="22">22</option>
                            <option value="23">23</option>
                            <option value="24">24</option>
                            <option value="25">25</option>
                            <option value="26">26</option>
                            <option value="27">27</option>
                            <option value="28">28</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>

            <div class="form-group">
                <label class="col-sm-1 control-label" style="margin-left: 6px;">备注</label>
                <div class="col-sm-10" style="margin-left: 24px;">
                    <textarea class="form-control col-sm-10" id="comment" maxlength="500">${item.comment}</textarea>
                </div>
            </div>
            <div class="col-sm-12" class="row btn-group-m-t">
                <div style="text-align: center;">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="PolicyInfoDlg.editSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="PolicyInfoDlg.close()"/>
                </div>
            </div>
        </div>

    </div>
</div>
<script src="${ctxPath}/static/modular/system/policy/policy_info.js"></script>
<script>
    laydate.render({
        elem: '#effectiveDate'
    });
    laydate.render({
        elem: '#invalidDate'
    });
</script>
@}
